#pragma once
#ifndef PERSECUTOR_H
#define PERSECUTOR_H

#include "Vec.h"

#include "SoundTransducer.h"
#include "AudioStream.h"

#include <fstream>

namespace ParticleEngine
{
	class ParticleContext;

	class ParticleBase;
	class ParticleObserver;

	class Persecutor
	{
	public:
		Persecutor(ParticleContext& NewContext);
		~Persecutor(void);

		void Refresh();

		void				Move(Vec<2, float> PosChange, float ZoomChange);
		void				BindParticle();
		void				Unbind();

		void				SetIdleStatusTrue();			//threadsave in den Idle Modus und
		void				SetIdleStatusFalse();			//threadsave in den Idle Modus und

		void				Save(std::ofstream& Stream);
		void				Load(std::ifstream& Stream);

		Vec<2,float>		Pos;
		float				Zoom;

		ParticleBase*		FocusParticle;
		AudioStream			Audio;

	private:
		ParticleContext&	Context;
	};

};

#endif